{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
~}}

<div class="wizard-header">
  {{#unless this.hidePopup}}
    <PopupMenu @class="wizard-dismiss-menu">
      <nav class="menu">
        <ul class="menu-list">
          <li class="action">
            <Hds::Button @text="Dismiss" @color="secondary" class="link" {{on "click" (action "dismissWizard")}} />
          </li>
        </ul>
      </nav>
    </PopupMenu>
  {{/unless}}
  <h1 class="title is-5">
    <Icon @name={{this.glyph}} />
    {{this.headerText}}
  </h1>
  {{#if this.showProgress}}
    <ToolTip @verticalPosition="below" as |T|>
      <T.Trigger @tabindex="-1">
        <WizardProgress @currentFeatureProgress={{this.currentFeatureProgress}} @progressBar={{this.progressBar}} />
      </T.Trigger>
      <T.Content @defaultClass="tool-tip">
        <div class="box">
          {{#if this.currentTutorialProgress}}
            {{this.currentTutorialProgress.text}}
          {{else}}
            <p>{{capitalize this.currentFeatureProgress.feature}}</p>
            {{this.currentFeatureProgress.text}}
          {{/if}}
        </div>
      </T.Content>
    </ToolTip>
  {{else}}
    {{#if this.selectProgress}}
      <WizardProgress @noProgress={{true}} @progressBar={{this.selectProgress}} />
    {{/if}}
  {{/if}}
</div>
{{yield}}